//
// Created by lensferno on 2022/3/30.
//

#include <sstream>
#include "DbTeacher.h"


DbTeacher::DbTeacher(const Staff &staff, const std::string &title, const std::string &job,
                     int salary) : Teacher(staff, title), Leader(staff, job), Staff(staff), salary(salary) {}

DbTeacher::DbTeacher(const DbTeacher &dbTeacher) : Teacher(dbTeacher), Leader(dbTeacher), Staff(dbTeacher),
                                                   salary(dbTeacher.salary) {}

std::string DbTeacher::toString() {
    std::stringstream output;
    output
            << "--> as leader:" << '\n'
            << Leader::toString() << '\n'
            << "--> as teacher:" << '\n'
            << Teacher::toString() << '\n'
            << "in DbTeacher:\nsalary:" << salary;
    return output.str();
};
